<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateApppageRectplAreasTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apppage_rectpl_areas', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('apppage_rectpl_id')->default(0)->unsigned()->comment('推荐位定义ID');
            $table->integer('apppage_id')->default(0)->nullable()->unsigned()->comment('页面ID');
            $table->integer('paneltpl_id')->default(0)->unsigned()->comment('模板编号');
            $table->string('area', 100)->comment('区位编号');
            $table->string('data')->nullable()->comment('推荐数据');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apppage_rectpl_areas');
    }
}
